﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Manage/Views/Shared/Master.Master"
    Inherits="System.Web.Mvc.ViewPage<List<EProductImage>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <div class="quick">
        <% Html.RenderPartial("StepByStep"); %>
    </div>
    <div style="margin: 5px;">
        <ul class="albumListContent" id="albumListContent">
            <% 
                foreach (EProductImage item in Model)
                {
            %>
            <li <%= item.IsCover?"class='cover'":"" %>>
                <img title="<%=  item.Title %>" alt="<%= item.Description %>" src="<%= string.Format("{0}/{1}/{2}",ViewData["ImageRoot"],ViewData["ProductId"],item.ImageName) %>" />
                <div>
                    <%= Html.CheckBox("isCover", item.IsCover, new { id = Guid.NewGuid() , value=item.ImageId })%></div>
                <%= Html.Hidden("ImageName", item.ImageName, new { id=Guid.NewGuid() })%>
                <%= Html.Hidden("ImageId", item.ImageId, new { id=Guid.NewGuid() })%>
                <%= Html.Hidden("Sequence" , item.Sequence , new { id=Guid.NewGuid() })%>
            </li>
            <%
                } %>
        </ul>
        <div class="overFlowHidden">
            <div class="floatLeft">
                <input type="checkbox" name="ckSelectAll" /><span class="font12 fontBold">全选/返选</span>
                <input type="button" value="设为封面" name="btnSetCover" />
                <input type="button" value="插入" name="btnInsertNew" />
                <input type="button" value="修改/描述/排序" name="btnModify" />
                <input type="button" value="删除" name="btnDelete" />
            </div>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cssLink" runat="server">
    <link rel="stylesheet" type="text/css" href="<%=Url.Content("~/css/Manage/ProductAlbum.css") %>" />
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="jsLink" runat="server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="cssContent" runat="server">
    <script type="text/javascript" src="<%=Url.Content("~/WebResources/ckfinder/ckfinder.js") %>"></script>
    <script src="<%=Url.Content("~/Scripts/Manage/Album.js") %>" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="jsContent" runat="server">
    <script type="text/javascript">
        $(function () {
            Album.SaveImageItemPost = '<%=Url.Action("Album") %>';
            Album.ProductId = '<%=ViewData["ProductId"] %>';
            Album.SetCoverUrl = '<%= Url.Action("SetCover") %>';
            Album.DeleteImagePost = '<%=Url.Action("DeleteImageItem") %>'
            Album.ItemUpdatePost = '<%=Url.Action("AlbumItemPost") %>';
            Album.Init();
        });
      
    </script>
</asp:Content>
